1. Field of the Invention
The present invention relates to a communication relay device with a redundancy function for a line in a network in accordance with a WAN environment, and a communication system using the relay device. More particularly, the present invention relates to a communication relay device with a redundancy function for a line in a network in a WAN environment including a redundancy channel in which a plurality of communication relay devices such as a bridge, a two-layer switch, and a multi-layer switch are connected in a one-to-one manner at both ends of the line, and a communication system using the relay device.
2. Description of the Related Art
A description will be given with respect to a network including a redundancy channel in which a plurality of bridges, for example, as a plurality of communication relay devices, are connected at both ends of a line in a one-to-one manner.
In a network containing a redundant route caused by a plurality of bridges, a spanning tree protocol is used for determining a route.
For example, as shown in FIG. 7, assume a network over which LAN 1 and LAN 2 are connected to each other by means of a bridge A.
Here, in the case where of a network over which node “n1” such as personal computer is connected to LAN 1, and further, HUB 1 is connected to LAN 2, packets transmitted from the node “n1” are transmitted to all nodes of a broadcast domain including node “n2” such as personal computer connected to the HUB 1 via LAN 1→bridge A→LAN 2→HUB 1.
Over such network, when HUB 2 is connected to LAN 1 and LAN 2 in parallel to bridge A, a packet transmitted from the node “n1” loops over the network like LAN 1→bridge A→LAN 2→HUB 2→LAN 1→bridge A→LAN 2→HUB 2. As a result, a packet cannot be transmitted from a node other than node “n1” (node in a broadcast domain other than node “n1”).
In the case where a network is configured by only bridge A and HUB 1 as shown in FIG. 7, a spanning tree is employed to prevent a packet transmitted from a node from looping over the network.
In addition, as shown in FIG. 8, in the case where two bridges A and B are connected in parallel between LAN 1 to which node “n1” such as personal computer is connected and LAN 2 to which HUB 1 is connected, thereby making communication among nodes “n2”, “n3”, “n4”, . . . such as personal computers connected to node “n1” and HUB 1, one bridge A is generally used to make communication. When this bridge A is linked down, the other bridge B is used to make communication, whereby a spanning tree is employed in order to cause a network to provide redundancy.
Here, basic algorithm and protocol of the spanning tree consists of the following items (1) to (5) (Refer to ISO/IEC 15802-3: 1998 (E) ANSI/IEEE Std 802. 1D, 1998 Edition, LOCAL AND METROPOLITAN AREA NETWORKS: MEDIA ACCESS CONTROL (MAC) BRIDGES, pp. 58-75, 8. The Spanning Tree Algorithm and Protocol).
(1) A special frame called Configuration Bridge Protocol Data Units (hereinafter, referred to as BPDU) is exchanged between bridges.
The following works are performed based on this exchanged BPDU.
(2) A network root bridge is selected.
Only one root bridge exists in the entire LAN bridge connected.
(3) Each bridge computes the shortest route that reaches a root bridge (A port that provides the shortest route to the root bridge is called a root port).
(4) With respect to each LAN, a “designated bridge” is selected from a bridge connected to such each LAN.
(5) Each bridge selects a port (designated port) that belongs to a spanning tree and a port (blocked port) that does not belong to such spanning tree.
All data frames received at a blocked port are discarded.
In addition, frame transmission from a blocked port is not performed at all.
A received BPDU is not forwarded at all.
A data portion of the above mentioned BPDU includes at least root ID, bridge ID, and root path cost.
Root ID is an ID of a root bridge (or a bridge assumed to be such root bridge), and is generated based on a MAC address of such bridge and a priority designated by an administrator.
Bridge ID is an ID of a bridge that transmits a BPDU, and is generated based on a MAC address of such bridge and a priority designated by an administrator.
A root path cost is a cost of the (possible) shortest route from a bridge that transmits a BPDU to a root bridge.
In an initial state (when a power is supplied), each bridge is a root bridge itself, and it is assumed that a root path cost is 0.
Each bridge transmits the initial value of a BPDU to all ports, and at the same time, receives the BPDU transmitted from another bridge from all the ports.
In the case where a bridge has received a better BPDU from a port, such bridge stops transmission of BPDU to that port, and then, changes the value of the BPDU to be transmitted by the bridge itself.
In this manner, in the case where a spanning tree enters a stable state, only one bridge transmits a BPDU among each LAN.
For example, in the case where BPDU 1 and BPDU 2 are present, it is judged which of the above two BPDUs is better in accordance with rules (1) to (4) below.
(1) In the case where root ID of BPDU 1 is numerically smaller than that of BPDU 2, it is judged that BPDU 1 is better than BPDU 2.
(2) In the case where root ID of BPDU 1 is numerically equal to that of BPDU 2, if a root path cost of BPDU 1 is smaller than that of BPDU 2, it is judged that BPDU 1 is better than BPDU 2.
(3) In the case where root-ID of BPDU 1 is numerically equal to that of BPDU 2, and a root path cost of BPDU 1 is equal to that of BPDU 2, if bridge ID of BPDU 1 is numerically smaller than that of BPDU 2, it is judged that BPDU 1 is better than BPDU 2.
(4) In the case where root ID of BPDU 1 numerically equal to that of BPDU 2, a root path cost of BPDU 1 is equal to that of BPDU 2, and bridge ID of BPDU 1 is numerically equal to that of BPDU 2, if port ID of BPDU 1 is smaller than that of BPDU 2, it is judged that BPDU 1 is better than BPDU 2.
Then, each bridge compares the initial value of its own BPDU with that of the BPDU from another bridge received from all ports, and selects root ID from the best BPDU.
Next, each bridge computes its own root path cost in accordance with (root path cost)=(root path cost in the best BPDU)+path cost.
A path cost is a cost to the root that each port individually has, and the value of the cost can be set by an administrator.
Once a root ID, a route port, and a root path cost are defined, each bridge updates the content of BPDU transmitted by such each bridge itself.
Further, its own updated BPDU is compared with BPDU received from a port other than root port, and it is judged whether or not each port other than root port is a designated bridge itself.
A port that is a designated bridge is called a designated port, and a port that is not a designated bridge is called a blocked port.
In BPDU transmission and data frame forwarding to a root port, a designated port and a blocked port, a data frame is forwarded at the root port without transmitting BPDU; BPDU is transmitted, and a data frame is forwarded at the designated port; and BPDU is not transmitted, and a data frame is not forwarded at the blocked port.
In this manner, once a spanning tree is configured, each bridge performs regular operations described in (1) to (4) below.
These regular operations are required for reconfiguring a spanning tree that has been configured due to a bridge fault or addition of new bridge.
(1) BPDU includes an element called “message age”.
This value denotes an elapsed time after a root bridge has generated a BPDU that corresponds to the above BPDU.
(2) A root bridge transmits its own BPDU periodically to all ports. At this time, “message age” is set to 0.
(3) Each bridge stores a received BPDU, and increases the value of the “message age” of the BPDU stored in each port with an elapse of time (message age timer).
(4) A bridge other than root bridge transmits its own BPDU when it receives a BPDU from a root port.
At this time, as a value of the “message age”, there is used a value equal to or greater than the “message age” of the root port and greater than the “message age” of the received BPDU.
Here, the reconfiguration of the spanning tree occurs in any of the cases described in (1) and (2) below.
(1) In the case where the “message age” timer of the stored BPDU times out (in the case where a max age is exceeded); or
(2) In the case where a BPDU better than that stored in a port or a BPDU with the small value of the message age is received from the same port.
In the case where any of the above events occurs, a bridge performs re-computation for a root ID, a root cost, and a root port.
In the meantime, it is very dangerous to perform data frame transmission before all the bridges over a network enters a normal state after configuration (reconfiguration) of a spanning tree has been started.
This is because there is a possibility that a temporary loop occurs during spanning tree configuration.
Therefore, even if each bridge determines its own designated port, it does not start data frame forwarding immediately.
There are three types of the states of each port in a bridge:
(1) listening: No work concerning a data frame is carried out.
(2) learning: Although the learning of a starting MAC address is performed, forwarding is not performed.
(3) forwarding: Data frame forwarding is performed.
The lengths of the listening state and learning state are called a “forward delay”. A root bridge determines its value, enters its value in a BPDU, and transmits the fact to each bridge.
In addition, a timer employed in the listening state and learning state is called a “forwarding timer”.
If spanning tree reconfiguration occurs, a host position changes, and the contents of an old learning table may be incorrect.
Thus, the bridge corresponding to a spanning tree has the following two kinds of states as timeout values of the learning table aging timer.
(1) Normal value: This value is set to a long time such as a few minutes.
(2) A value used after topology change: This value is the same as the forward delay value.
When a bridge senses spanning tree reconfiguration, the timeout value of the learning table aging timer is set to a value identical to forward delay for a predetermined period of time.
In the meantime, a spanning tree algorithm and protocol have a system that notifies to all bridges that spanning tree reconfiguration has occurred as in (1) to (5) below.
(1) When a bridge senses a topology change, that bridge transmits a frame called TCN-BPDU (Topology Change Notification BPDU) to a root port with hello time intervals.
This transmission is continued until a BPDU in which a TCA (Topology Change Acknowledgment) flag is set has been received from the root port.
(2) A bridge which has received TCN-BPDU also transmits TCN-BPDU to its own root port.
On the other hand, to a port that receives a TCN-BPDU, a BPDU TCA flag is set, and a BPDU is transmitted during transmission of the next BPDU.
(3) In the case where a root bridge receives a TCN-BPDU or the state of its own port changes, the root bridge transmits a BPDU in which a TC (Topology Change) flag is set from that time to a max age+forward delay time.
(4) A bridge which has received the TC flag set BPDU from a root port sets a TC flag for its own BPDU, and transmits such BPDU.
This transmission is continued until a BPDU in which a TC flag is not set has been received.
(5) While a bridge receives TC flag set BPDU from the root port, the bridge uses the value of “forward delay” as a timeout value of the learning table aging timer.
In this way, a spanning tree has an algorithm for automatically removing a loop in a redundant bridge network, and automatically sensing a network topology change caused by a device fault or cable failure, thereby automatically changing a network topology so as to prevent a loop from being produced.
In the meantime, a spanning tree works so as not to form a loop in a network, as described above.
For example, as shown in FIG. 9, in a network 21 with a spanning tree structure including a redundancy channel in which three bridges 1 (1A to 1C) are connected to each other via a bus type LAN 11, there is a need to transmit a packet to an opening of a closed port in a blocking state in order to enable transmission/reception of a packet relevant to a node (not shown) to be connected to the bus type LAN 11 among the bridges 1A to 1C. In the conventional spanning tree, a loop is cut at a point.
In an example shown in FIG. 9, a port P2 of the bridge 1C enters a blocking state in which packet forwarding is not carried out, thereby preventing a broadcast from being looped.
At this time, the bridge 1C determines whether or not the blocking state is established. Thus, the bridge 1B does not know whether or not the port P2 of the bridge 1C enters the blocking state.
Namely, a broadcast packet flows between the bridge 1B and the bridge 1C, but the bridge 1C discards a packet received from the port P2. Thus, a loop is cut out.
As described above, the conventional spanning tree does not have any particular problem as long as the tree is used in a LAN environment.
This is because nobody has no problem even if a redundant traffic flows between the bridge 1B and the bridge 1C in FIG. 9, for example.
However, in the latest technology, it is possible to supply the data between the bridges via a WAN (wide area network) by using a BCP (Bridge Control Protocol) (refer to Higashiyama, PPP Bridging Control Protocol, Internet Engineering Task Force, July, 2000) defining procedures for transferring an Ethernet (R) frame over PPP (Point to Point Protocol) connection.
Further, it is possible to use a utilization method of supplying WAN data via Internet by using an L2TP (Layer 2 Tunneling Protocol) described later, the protocol being a VPN (virtual private network) technology.
Otherwise, there is known a technology of supplying data via Internet by providing an IP header in front of the Ethernet (R) frame and encapsulating the header.
In combination between a method of supplying data over the above described WAN and a method of supplying the WAN data over Internet, it is possible to construct a spanning tree over Internet.
In this method, for example, as shown in FIG. 10, in a network in accordance with the WAN network, a packet from the bridge 1B to the bridge 1C is discarded at the bridge 1C. However, the bridge 1B does not know the fact, and continuously transmits a packet to the bridge 1C via Internet.
Thus, there is a problem that redundant data is supplied over Internet, and a redundant traffic occurs with Internet that is a shared resource, causing impaired line efficiency.
In addition, there is a problem that, where a connection is made between the bridge 1B and the bridge 1C via the WAN, thereby constructing a network in which accounting is carried out based on the number of packets to be communicated, redundant packet communication is carried out between the bridge 1B and the bridge 1C, and the packet itself increases a communication cost.